As a method for compressing and recording a moving image, the H.264/MPEG-4AVC (hereafter referred to as H.264) is known (ISO/IEC 14496-10; 2004 Information technology—Coding of audio-visual objects—Part 10: Advanced Video Coding). The 11.264 is widely used for one-segment terrestrial digital broadcasting.
The H.264 enables changing quantization parameters in macroblock units (16×16 pixels) by using the mb_qp_delta code. A formula 7-23 discussed in the above-mentioned document adds a difference value mb_qp_delta to a quantization parameter QPYPREV of a macroblock last decoded to change quantization parameters in macroblock units (16×16 pixels).
In recent years, an activity for internationally standardizing the High Efficiency Video Coding (HEVC) has been started. (The HEVC is a still higher efficiency coding method which is a successor of the H.264.) This activity, with the increase in screen size, considers division by larger block sizes than conventional macroblocks (16×16 pixels). According to JCT-VC contribution JCTVC-A205.doc, a basic block having a larger size is referred to as Largest Coding Tree Block (LCTB). The consideration premises a size of 64×64 pixels (JCT-VC contribution JCTVC-A205.doc<http://wftp3.itu.int/av-arch/jctvc-site/2010_04_A_Dresden/>). The LCTB is further divided into a plurality of subblocks, i.e., Coding Tree Blocks (CTBs) subjected to transform and quantization. As a division method, a region quadtree structure is used to divide a block into four subblocks (two vertically and two horizontally).
FIG. 2A illustrates the region quadtree structure. A thick frame 10000 indicates a basic block which is formed of 64×64 pixels to simplify descriptions. Each of subblocks 10001 and 10010 is formed of 16×16 pixels. Each of subblocks 10002 to 10009 is formed of 8×8 pixels. Subblocks are formed in this way and used for transform and other coding processing.
With the HEVC, it is considered that quantization parameter control is performed on a basic block basis in a similar way to macroblocks of the H.264. However, from the viewpoint of image quality, it is actually desirable to perform quantization parameter control on a subblock basis. In this case, quantization in smaller units is expected to be performed through quantization parameter control on a subblock basis.
However, processing is performed based on the region quadtree structure even if quantization in smaller units is possible. Therefore, it has not been possible to efficiently perform parallel processing on a subblock basis, disabling improvement in coding and decoding processing speed. Specifically, referring to FIG. 2A, the subblock 10001 (16×16 pixels), the subblocks 10002 to 10009 (8×8 pixels), and the subblock 10010 (16×16 pixels) are processed in this order. Since each of subblock quantization parameters is calculated by using a difference value from a quantization parameter of the preceding subblock as a predicted value, these quantization parameters needs to be subjected to successive processing, thus disabling efficient parallel processing on a subblock basis.
Further, when quantization parameter optimization is attempted for each subblock, difference values will vary since processing for acquiring a quantization parameter difference value is performed based on the region quadtree structure. For example, FIG. 2B illustrates a quantization parameter value indicated at the center of each subblock. The example in FIG. 2B assumes a case where quantization parameter values gradually change from the top left to the bottom right. This phenomenon is likely to occur in ordinary natural images. Since the subblock 10001 has a quantization parameter of 12 and the subblock 10002 has a quantization parameter of 14, the subblock 10002 has a difference value of +2 from the subblock 10001. Subsequent difference values are +4, −6, +6, −6, +−0, +2, +4, and +2. Acquiring difference values according to the region quadtree structure in this way randomly fluctuates difference values, causing a problem that large codes are generated.